<script setup>
import { ref, reactive } from 'vue'

//假设这是用户信息返回的按钮权限
const btn = ref(['add', 'delete'])
</script>

<template>
    <div>attr</div>
    <el-button v-if="btn.includes('add')">Add</el-button>
    <el-button v-if="btn.includes('delete')">Delete</el-button>
    <el-button v-if="btn.includes('modify')">Modify</el-button>
</template>

<style scoped lang="scss"></style>